# -*- coding: utf-8 -*-
'''
    date:2017-06-05 hqk
    spider newadd rest class
'''
from dianp_newadd import DianpNewaddTask
from dianp_update import DianpUpdateTask
from common.dianp_log import DianpLog
from dianp_threads import DianpThreads

class dianpServer(object):
    def __init__(self):
        self.newaddTask = DianpNewaddTask()
        self.updateTask =  DianpUpdateTask()
        self.taskTh = DianpThreads()
        
        
    def main(self):
        self.taskTh.registerTask(7, 0,self.newaddTask)
        self.taskTh.registerTask(7, 0,self.updateTask)
        self.taskTh.startTimerJob()
        
        
ss = dianpServer()        
ss.main()
    
